CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(zzzCode)

SET(EXECUTABLE_OUTPUT_PATH "${zzzCode_BINARY_DIR}/bin" CACHE INTERNAL "")
SET(LIBRARY_OUTPUT_PATH "${zzzCode_BINARY_DIR}/lib" CACHE INTERNAL "")

LINK_DIRECTORIES("${zzzCode_BINARY_DIR}/lib")

SET(LIB_MODE Minimal Full)

SET(CMAKE_BUILD_TYPE Debug)

IF(("${CMAKE_BUILD_TYPE}" EQUAL "Release"))
	SET(DEBUG_MODE 0)
ELSE()
	SET(DEBUG_MODE 1)
ENDIF()
IF( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
	SET(BIT_MODE 64)
ELSEIF( "${CMAKE_SIZEOF_VOID_P}" EQUAL "4" )
	SET(BIT_MODE 32)
ELSE()
	SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}_Unknown")
ENDIF()

INCLUDE_DIRECTORIES(zzzEngine/zCore/zCore)
INCLUDE_DIRECTORIES(zzzEngine/zGraphics/zGraphics)
INCLUDE_DIRECTORIES(zzzEngine/zVision/zVision)
INCLUDE_DIRECTORIES(zzzEngine/zMatrix/zMatrix)
INCLUDE_DIRECTORIES(zzzEngine/zImage/zImage)
INCLUDE_DIRECTORIES(zzzEngine/zVisualization/zVisualization)
INCLUDE_DIRECTORIES(zzzEngine/zAI/zAI)

INCLUDE_DIRECTORIES(3rdParty/Freeglut/include)
INCLUDE_DIRECTORIES(3rdParty/Glew)
INCLUDE_DIRECTORIES(3rdParty/UnitTest++/src)

ADD_DEFINITIONS(-DZZZ_NO_PRAGMA_LIB)

IF((WIN32) AND (${LIB_MODE} EQUAL FULL) AND (${CMAKE_CXX_COMPILER} MATCHES ".*/cl.exe"))
	SET(COMMON_INCLUDE_PATH "d:/library/include")
	SET(COMMON_LIB_PATH "d:/library/lib")
	SET(COMMON_64LIB_PATH "d:/library/X64_lib")
	SET(BOOST_INCLUDE_PATH "d:/boost/boost_1_44_0")
	SET(BOOST_LIB_PATH "d:/boost/boost_1_44_0/stage/lib")
	SET(BOOST_64LIB_PATH "d:/boost/boost_1_44_0/stage/lib64")
	SET(QT_INCLUDE_PATH "d:/Qt/4.7.3/include")
	SET(QT_LIB_PATH "d:/Qt/4.7.3/lib")
	SET(QT_64LIB_PATH "d:/Qt/4.7.3/lib64")

	INCLUDE_DIRECTORIES(${COMMON_INCLUDE_PATH})
	INCLUDE_DIRECTORIES(${BOOST_INCLUDE_PATH})
	INCLUDE_DIRECTORIES(${QT_INCLUDE_PATH})
	IF (${BIT_MODE} EQUAL 32)
		LINK_DIRECTORIES(${COMMON_LIB_PATH})
		LINK_DIRECTORIES(${BOOST_LIB_PATH})
		LINK_DIRECTORIES(${QT_LIB_PATH})
	ELSE()
		LINK_DIRECTORIES(${COMMON_64LIB_PATH})
		LINK_DIRECTORIES(${BOOST_64LIB_PATH})
		LINK_DIRECTORIES(${QT_64LIB_PATH})
	ENDIF()
ENDIF()

IF(UNIX)
ENDIF(UNIX)

MESSAGE("CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
MESSAGE("COMMON_INCLUDE_PATH: ${COMMON_INCLUDE_PATH}")
MESSAGE("BOOST_INCLUDE_PATH: ${BOOST_INCLUDE_PATH}")
MESSAGE("QT_INCLUDE_PATH: ${QT_INCLUDE_PATH}")

ADD_SUBDIRECTORY(3rdParty)
ADD_SUBDIRECTORY(zzzEngine)
ADD_SUBDIRECTORY(EngineTest/MathTest)
